package com.example.distillapplication.data.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity
public class OperationLog {
    @PrimaryKey(autoGenerate = true)
    private int operationId;

    @ColumnInfo(name = "userId")
    private int userId;

    @ColumnInfo(name = "loginTime")
    private String loginTime;

    @ColumnInfo(name = "logoutTime")
    private String logoutTime;

    @ColumnInfo(name = "operationData")
    private String operationData;

    //ID由于是主键，系统自动生成，不要放在构造方法中
    public OperationLog(int userId, String loginTime, String logoutTime, String operationData) {
        this.userId = userId;
        this.loginTime = loginTime;
        this.logoutTime = logoutTime;
        this.operationData = operationData;
    }

    public int getOperationId() {
        return operationId;
    }

    public void setOperationId(int operationId) {
        this.operationId = operationId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(String loginTime) {
        this.loginTime = loginTime;
    }

    public String getLogoutTime() {
        return logoutTime;
    }

    public void setLogoutTime(String logoutTime) {
        this.logoutTime = logoutTime;
    }

    public String getOperationData() {
        return operationData;
    }

    public void setOperationData(String operationData) {
        this.operationData = operationData;
    }
}
